// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported AppDisplay, AppSearchProvider */
-const { Clutter, Gio, GLib, GObject, Graphene, Meta,
- Pango, Shell, St } = imports.gi;
+const {
+ Clutter, Gio, GLib, GObject, Graphene, Pango, Shell, St,
+} = imports.gi;
const AppFavorites = imports.ui.appFavorites;
const { AppMenu } = imports.ui.appMenu;
this._items = new Map();
this._orderedItems = [];
- this._animateLaterId = 0;
- this._viewLoadedHandlerId = 0;
- this._viewIsReady = false;
-
// Filter the apps through the user’s parental controls.
this._parentalControlsManager = ParentalControlsManager.getDefault();
this._appFilterChangedId =
this._moveItem(icon, page, position);
});
- this._viewIsReady = true;
this.emit('view-loaded');
}
}
}
- _doSpringAnimation(animationDirection) {
- this._grid.opacity = 255;
- this._grid.animateSpring(
- animationDirection,
- Main.overview.dash.showAppsButton);
- }
-
- _clearAnimateLater() {
- if (this._animateLaterId) {
- Meta.later_remove(this._animateLaterId);
- this._animateLaterId = 0;
- }
- if (this._viewLoadedHandlerId) {
- this.disconnect(this._viewLoadedHandlerId);
- this._viewLoadedHandlerId = 0;
- }
- }
-
_getDropTarget(x, y, source) {
const { currentPage } = this._grid;
vfunc_unmap() {
this._swipeTracker.enabled = false;
- this._clearAnimateLater();
this._disconnectDnD();
super.vfunc_unmap();
}
this._redisplayWorkId = Main.initializeDeferredWork(this, this._redisplay.bind(this));
Shell.AppSystem.get_default().connect('installed-changed', () => {
- this._viewIsReady = false;
Main.queueDeferredWork(this._redisplayWorkId);
});
this._folderSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.app-folders' });
this._folderSettings.connect('changed::folder-children', () => {
- this._viewIsReady = false;
Main.queueDeferredWork(this._redisplayWorkId);
});
}